package Arrays101.Day01;

public class Day01_2 {
    public static void main(String[] args) {
        int numbers = findNumbers(new int[]{555, 901, 482, 1771});
        System.out.println(numbers);
    }

    /**
     * Find Numbers with Even Number of Digits
     *
     * Given an array nums of integers, return how many of them contain an even number of digits.
     * @param nums
     * @return
     */
    public static int findNumbers(int[] nums) {
        int num=0;
        for (int i = 0; i < nums.length; i++) {
            if (String.valueOf(nums[i]).length()%2==0){
                num++;
            }
        }
        return num;
    }
}
